import { defineConfig } from '../defineConfig'
import { SiteType } from '../type'
const siteConfig = {
  com: {
    // # 接口地址 dev 环境
    NEXT_PUBLIC_API_PATHNAME: 'https://prod-rt-api.olightstore.com',
    // # CDN地址 dev 环境
    NEXT_PUBLIC_CDN_PATH: 'https://prod-rt.olicdn.com',
    // # dev 环境 URL
    NEXT_PUBLIC_SITE_PATH: 'https://prod-rt.olightstore.com/'
  },
  us: {
    // # 接口地址 dev 环境
    NEXT_PUBLIC_API_PATHNAME: 'https://prod-rt-api.olightstore.us',
    // # CDN地址 dev 环境
    NEXT_PUBLIC_CDN_PATH: 'https://prod-rt.olicdn.us',
    // # dev 环境 URL
    NEXT_PUBLIC_SITE_PATH: 'https://prod-rt.olightstore.us/'
  },
  de: {
    NEXT_PUBLIC_API_PATHNAME: 'https://prod-rt-api.olightstore.de',
    NEXT_PUBLIC_CDN_PATH: 'https://prod-rt-de.olicdn.com',
    NEXT_PUBLIC_SITE_PATH: 'https://prod-rt-olightstore.de/'
  }
}

export function createProdConfig() {
  return defineConfig({
    env: 'prod',
    apiURL: 'https://api.mydomain.com',
    site: siteConfig[(process.env['NEXT_PUBLIC_SITE_MOCK'] || 'com') as SiteType],
  })
}
